import request from '@/utils/request';
export const getHwTemperature = (data) => request.post('/inspect/camera-ctrl-rest/getHwTemperature', data);
// 场站树
export const stationTree = (data) => request.post('/ledger/busVideoNvr/getVedioTree', data);
// 巡检设备树V3
export const patrolDeviceTreeV3 = (data) => request.post('/inspect/tree/patrol-device-tree-nvr-v3', data);
// 防区树
export const securityZoneTree = (data) => request.post('/inspect/tree/security-zone-tree', data);
// 轮播方案树
export const carouselPlanTree = (data) => request.post('/inspect/tree/carousel-plan-tree', data);

// 新增巡视设备关注
export const patrolDeviceFollow = (data) => request.post('/inspect/patrol-device-follow', data);

// 取消巡视设备关注
export const delPatrolDeviceFollow = (data) => request.post('/inspect/patrol-device-follow/del', data);
// 获取实时视频播放信息
export const videoRealTimeDisplayInfo = (params) =>
  request.get('/inspect/patrolDevice/video-real-time-display-info', { params });

// 视频流播放预请求
export const realTimeStream = (data) => request.post('/inspect/camera-ctrl-rest/realTimeStream', data);

// 云镜控制
export const controlPtz = (data) => request.post('/ledger/camera-ctrl-rest/control-ptz', data);

// 抓图
export const capturePicture = (data) => request.post('/ledger/camera-ctrl-rest/capture-picture', data);

// 开始录像
export const cameraCtrlRestRecstart = (data) => request.post('/inspect/camera-ctrl-rest/recstart', data);

// 结束录像
export const cameraCtrlRestRecstop = (data) => request.post('/inspect/camera-ctrl-rest/recstop', data);
export const StartVoice = (data) => request.post('/insForAv/StartVoice', data);
// 3D放大
export const cameraCtrlRestRealPs3dLocation = (data) => request.post('/ledger/camera-ctrl-rest/realPs3dLocation', data);

// 查询摄像头预置位列表
export const camPresetPositionCfgDetail = (params) =>
  request.get('/inspect/cam-preset-position-cfg/detail', { params });

// 预置位设置
export const camPresetPositionCfgSet = (data) => request.post('/inspect/cam-preset-position-cfg/set', data);

// 转到预置位
export const cameraCtrlRestSetPresetPos = (data) => request.post('/inspect/camera-ctrl-rest/set-preset-pos', data);

// 清除摄像头预置位配置
export const camPresetPositionCfgClear = (params) =>
  request.post('/inspect/cam-preset-position-cfg/clear/del', undefined, { params });

// 设置守望位
export const camPresetPositionCfgSetCamPark = (data) =>
  request.post('/inspect/cam-preset-position-cfg/setCamPark', data);

// 启动录像 -- 下载
export const cameraCtrlRestDownload = (params, axiosConf) =>
  request({
    url: '/ledger/camera-ctrl-rest/download',
    ...axiosConf,
    timeout: 0,
    params
  });

// 历史录像查询
export const cameraCtrlRestGetHistoryVideo = (data) => request.post('/ledger/camera-ctrl-rest/getHistoryVideo', data);

// 实时监控-录像回放-设备信息
export const historyVideoCtrlCameraOperaParam = (data) => request.post('/ledger/camera-ctrl-rest/playVideo', data);

// 实时监控-录像回放-录像资源下载路径获取
export const historyVideoCtrlGetHistoryVideoLoadPath = (data) =>
  request.post('/ledger/camera-ctrl-rest/getHistoryVideoLoadPath', data);

// 录像回放
export const cameraCtrlRestPlayVideo = (data) => request.post('/ledger/camera-ctrl-rest/playVideo', data);

export const updVideoPriority = (patrolDeviceCode, priority) =>
  request.post(`/inspect/patrolDevice/updVideoPriority?patroldeviceCode=${patrolDeviceCode}&priority=${priority}`);

export const getStationBandwidth = (stationCode) =>
  request.get('/inspect/patrolDevice/getStationBandwidth?stationCode=' + stationCode);
